Edit a module fails, how can I know why?

Hi all,
Came to this problem a while ago, still not sure how to take care of it:
Trying to open a module using the edit command and it fails. if the script runs as a standard user, how can I tell the reason for this? it could be one of:
1. the module is opened by someone else
2. I don't have permission to open it for read

Thanks!

Asaf Kivity
Manageware Israel
www.manageware.co.il
asafki - Sun Jan 23 12:16:50 EST 2011

Re: Edit a module fails, how can I know why?
SystemAdmin - Sun Jan 23 17:23:43 EST 2011

Some more info would be useful.

When you run the script in the DXL Interaction window, do any errors appear in the DXL Output pane at the bottom of the window?? If yes, it would be handy to know what those errors are and perhaps a copy of the DXL code that you're using to open modules for editing.

Something you can try - the Module edit function has an optional silent parameter that when enabled will provide feedback to the user as to why a module cannot be opened for editing - set this parameter to true and see if that helps.
Paul Miller
Melbourne, Australia

Re: Edit a module fails, how can I know why?
llandale - Mon Jan 24 16:06:04 EST 2011

This function will give the permission of the current user to the Module:

string    PermissionOf(string NameMod)
{     // Get the current user's Permission to the Module
 
        ModName_        mn      = module(NameMod)
        if (null mn) return("none")
        string  Me      = doorsname()
        Buffer  buf = create()
        if (hasPermission(Me, mn, read))        buf += "R"
        if (hasPermission(Me, mn, modify))      buf += "M"
        if (hasPermission(Me, mn, create))      buf += "C"
        if (hasPermission(Me, mn, delete))      buf += "D"
        if (hasPermission(Me, mn, control))     buf += "A"
 
        if (length(buf) == 0) buf = "none"
        string  Results = stringOf(buf)
        delete(buf)
        return(Results)
}     // end PermissionOf(NameMod)


So your user could check what permissions they have before calling Edit.

I don't think they can check Locks to find out if someone is currently editing the module, but if they indeed have Write permission and the "edit" fails, I guess they could dedude someone is in it.

 

 

  • Louie